<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'htmlOptions'=>array("class"=>'table table-striped table-hover table-condensed table-white table-detail'),
	'attributes'=>array(
		'id',
		array(
				'name'=>'nom',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_nom == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_nom == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->nom 
		),
		array(
				'name'=>'prenom',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_prenom == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_prenom == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->prenom
		),
		array(
				'name'=>'pseudo',
				'visible'=>(Yii::app()->user->admin || $model->v_pseudo == 1 || Yii::app()->user->id == $model->id)
		),
		array(
				'name'=>'adr',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_adr == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_adr == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->adr
		),
		array(
				'name'=>'cp',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_cp == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_cp == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->cp
		),
		array(
				'name'=>'ville',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_ville == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_ville == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->ville
		),
		array(
				'name'=>'telfixe',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_telfixe == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_telfixe == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->telfixe
		),
		array(
				'name'=>'telport',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_telport == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_telport == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->telport
		),
		array(
				'name'=>'email',
				'type'=>'html',
				'visible'=>(Yii::app()->user->admin || $model->v_email == 1 || Yii::app()->user->id == $model->id),
				'value'=>(($model->v_email == 0) ? "<span class='fa fa-eye-slash'></span> " : " ") . $model->email
		),
		array(
				'name'=>'modecontact',
				'value'=>($model->modecontact==0) ? "Messagerie interne" : (($model->modecontact==1) ? "Email" : (($model->modecontact==2) ? "Téléphone fixe" : "Téléphone portable"))			
		),
		array(
				'name'=>'date_inscr',
				'visible'=>(Yii::app()->user->admin || Yii::app()->user->id == $model->id),
				'value'=>Yii::app()->dateFormatter->format('dd/MM/yyyy',$model->date_inscr)
		),
		array(
				'name'=>'notif_message',
				'label'=>'Notification message',
				'visible'=>(Yii::app()->user->admin || Yii::app()->user->id == $model->id),
				'value'=>($model->notif_message == 1) ? "Oui" : "Non"
		),
		array(
				'name'=>'notif_demande',
				'label'=>'Notification demande',
				'visible'=>(Yii::app()->user->admin || Yii::app()->user->id == $model->id),
				'value'=>($model->notif_demande == 1) ? "Oui" : "Non"
		),
		array(
				'label'=>'Administrateur',
				'value'=>($model->admin==1) ? "Oui" : "Non",
				'visible'=>Yii::app()->user->admin
		),
		array(
				'label'=>'Grains',
				'type'=>'html',
				'value'=>$model->getGrains()
		),
		
	),
)); ?>